<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<head>
<title>公告列表</title>
<script type="text/javascript">
$(document).ready(function(){

});

function checkDelet(id){
	if(BaseJs.confirm('确定要删除吗？')){
		$.urlAjax('notice/EditNotice!delete?notice.id='+id,function(){
			$('#pt' + id).remove();
		});
	}
}
</script>
</head>
<body>
<h2 class="title">公告列表<m:permiss permiss="NOTICE_MANAGE"><m:imgA img="add" msg="发布公告"
	action="notice/EditNotice!toEdit" /></m:permiss> </h2>
<table class="list">
	<thead>
		<tr>
			<th width="30%">标题</th>
			<th width="20%">发布日期</th>
			<th width="20%">结束日期</th>
			<th width="15%">发布者</th><m:permiss permiss="NOTICE_MANAGE">
			<th width="15%">操作</th></m:permiss>
		</tr>
	</thead>
	<tbody>
		<s:iterator value="notices.items">
			<tr id="pt${id }">
				<td><a
					href="<s:url action="notice/EditNotice!show"/>?notice.id=${id}"
					id="n${id }" target="_blank"> <s:property value="title" /> </a></td>
				<td><s:date name="createDate" format="yyyy-MM-dd" /></td>
				<td><s:date name="deadDate" format="yyyy-MM-dd" /></td>
				<td><s:property value="createUser.name" /></td><m:permiss permiss="NOTICE_MANAGE">
				<td><m:imgA img="edit" msg="修改"
					action="notice/EditNotice!toEdit?notice.id=${id}" /> <m:imgA
					img="delete" msg="删除" onclick="javascript:checkDelet(${id});" /></td></m:permiss>
			</tr>
		</s:iterator>
	</tbody>
</table>
<m:page value="${notices}" showSeaBar="true" />
</body>